package com.ksyun.campus.client.domain;

/**
 * @author zhaozhikai
 * @date 2023/8/9 14:53
 */
public enum ModeType {
   Unknown(0), Master(1), Follower(2);

    private int code;

    ModeType(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static ModeType get(int code) {
        switch (code) {
            case 1:
                return Master;
            case 2:
                return Follower;
            default:
                return Unknown;
        }
    }


}
